package hoowin.basic.action;

import hoowin.basic.service.LogService;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class DoLogin extends ActionSupport {
	private String name;
	private String password;
	private String message;
	private LogService logService;
	public String execute(){
		String info = logService.doLogin(name, password);
		if(info.equals(SUCCESS))return SUCCESS;
		else{
			setMessage(getText(info));
			return LOGIN;
		}
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getPassword() {
		return password;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getMessage() {
		return message;
	}
	public void setLogService(LogService logService) {
		this.logService = logService;
	}
}
